package com.es.disped.dao.mapper;

import com.es.disped.dao.model.LoggingEvent;
import com.es.disped.dao.model.LoggingEventExample;
import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

//@CacheNamespace(implementation=(com.es.disped.dao.cache.RedisCache.class),size=512,flushInterval=60000)
public interface LoggingEventMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventSqlProvider.class, method="countByExample")
    long countByExample(LoggingEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=LoggingEventSqlProvider.class, method="deleteByExample")
    int deleteByExample(LoggingEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Delete({
        "delete from logging_event",
        "where event_id = #{eventId,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long eventId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into logging_event (event_id, timestmp, ",
        "logger_name, level_string, ",
        "thread_name, reference_flag, ",
        "arg0, arg1, arg2, ",
        "arg3, caller_filename, ",
        "caller_class, caller_method, ",
        "caller_line, formatted_message)",
        "values (#{eventId,jdbcType=BIGINT}, #{timestmp,jdbcType=BIGINT}, ",
        "#{loggerName,jdbcType=VARCHAR}, #{levelString,jdbcType=VARCHAR}, ",
        "#{threadName,jdbcType=VARCHAR}, #{referenceFlag,jdbcType=SMALLINT}, ",
        "#{arg0,jdbcType=VARCHAR}, #{arg1,jdbcType=VARCHAR}, #{arg2,jdbcType=VARCHAR}, ",
        "#{arg3,jdbcType=VARCHAR}, #{callerFilename,jdbcType=VARCHAR}, ",
        "#{callerClass,jdbcType=VARCHAR}, #{callerMethod,jdbcType=VARCHAR}, ",
        "#{callerLine,jdbcType=CHAR}, #{formattedMessage,jdbcType=LONGVARCHAR})"
    })
    int insert(LoggingEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=LoggingEventSqlProvider.class, method="insertSelective")
    int insertSelective(LoggingEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="timestmp", property="timestmp", jdbcType=JdbcType.BIGINT),
        @Result(column="logger_name", property="loggerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="level_string", property="levelString", jdbcType=JdbcType.VARCHAR),
        @Result(column="thread_name", property="threadName", jdbcType=JdbcType.VARCHAR),
        @Result(column="reference_flag", property="referenceFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="arg0", property="arg0", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg1", property="arg1", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg2", property="arg2", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg3", property="arg3", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_filename", property="callerFilename", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_class", property="callerClass", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_method", property="callerMethod", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_line", property="callerLine", jdbcType=JdbcType.CHAR),
        @Result(column="formatted_message", property="formattedMessage", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<LoggingEvent> selectByExampleWithBLOBs(LoggingEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="timestmp", property="timestmp", jdbcType=JdbcType.BIGINT),
        @Result(column="logger_name", property="loggerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="level_string", property="levelString", jdbcType=JdbcType.VARCHAR),
        @Result(column="thread_name", property="threadName", jdbcType=JdbcType.VARCHAR),
        @Result(column="reference_flag", property="referenceFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="arg0", property="arg0", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg1", property="arg1", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg2", property="arg2", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg3", property="arg3", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_filename", property="callerFilename", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_class", property="callerClass", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_method", property="callerMethod", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_line", property="callerLine", jdbcType=JdbcType.CHAR)
    })
    List<LoggingEvent> selectByExample(LoggingEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Select({
        "select",
        "event_id, timestmp, logger_name, level_string, thread_name, reference_flag, ",
        "arg0, arg1, arg2, arg3, caller_filename, caller_class, caller_method, caller_line, ",
        "formatted_message",
        "from logging_event",
        "where event_id = #{eventId,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="timestmp", property="timestmp", jdbcType=JdbcType.BIGINT),
        @Result(column="logger_name", property="loggerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="level_string", property="levelString", jdbcType=JdbcType.VARCHAR),
        @Result(column="thread_name", property="threadName", jdbcType=JdbcType.VARCHAR),
        @Result(column="reference_flag", property="referenceFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="arg0", property="arg0", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg1", property="arg1", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg2", property="arg2", jdbcType=JdbcType.VARCHAR),
        @Result(column="arg3", property="arg3", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_filename", property="callerFilename", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_class", property="callerClass", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_method", property="callerMethod", jdbcType=JdbcType.VARCHAR),
        @Result(column="caller_line", property="callerLine", jdbcType=JdbcType.CHAR),
        @Result(column="formatted_message", property="formattedMessage", jdbcType=JdbcType.LONGVARCHAR)
    })
    LoggingEvent selectByPrimaryKey(Long eventId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") LoggingEvent record, @Param("example") LoggingEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") LoggingEvent record, @Param("example") LoggingEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") LoggingEvent record, @Param("example") LoggingEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LoggingEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update logging_event",
        "set timestmp = #{timestmp,jdbcType=BIGINT},",
          "logger_name = #{loggerName,jdbcType=VARCHAR},",
          "level_string = #{levelString,jdbcType=VARCHAR},",
          "thread_name = #{threadName,jdbcType=VARCHAR},",
          "reference_flag = #{referenceFlag,jdbcType=SMALLINT},",
          "arg0 = #{arg0,jdbcType=VARCHAR},",
          "arg1 = #{arg1,jdbcType=VARCHAR},",
          "arg2 = #{arg2,jdbcType=VARCHAR},",
          "arg3 = #{arg3,jdbcType=VARCHAR},",
          "caller_filename = #{callerFilename,jdbcType=VARCHAR},",
          "caller_class = #{callerClass,jdbcType=VARCHAR},",
          "caller_method = #{callerMethod,jdbcType=VARCHAR},",
          "caller_line = #{callerLine,jdbcType=CHAR},",
          "formatted_message = #{formattedMessage,jdbcType=LONGVARCHAR}",
        "where event_id = #{eventId,jdbcType=BIGINT}"
    })
    int updateByPrimaryKeyWithBLOBs(LoggingEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update logging_event",
        "set timestmp = #{timestmp,jdbcType=BIGINT},",
          "logger_name = #{loggerName,jdbcType=VARCHAR},",
          "level_string = #{levelString,jdbcType=VARCHAR},",
          "thread_name = #{threadName,jdbcType=VARCHAR},",
          "reference_flag = #{referenceFlag,jdbcType=SMALLINT},",
          "arg0 = #{arg0,jdbcType=VARCHAR},",
          "arg1 = #{arg1,jdbcType=VARCHAR},",
          "arg2 = #{arg2,jdbcType=VARCHAR},",
          "arg3 = #{arg3,jdbcType=VARCHAR},",
          "caller_filename = #{callerFilename,jdbcType=VARCHAR},",
          "caller_class = #{callerClass,jdbcType=VARCHAR},",
          "caller_method = #{callerMethod,jdbcType=VARCHAR},",
          "caller_line = #{callerLine,jdbcType=CHAR}",
        "where event_id = #{eventId,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(LoggingEvent record);
}